﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Runtime.Serialization;

namespace IndiaBigSaleService
{
    [DataContract]
    public class UserDetails
    {
        [DataMember]
        public string UserName { get; set; }
        private string _password;
       
        public string Password { set { _password = value; } }
        [DataMember]
        public string FirstName { get; set; }
        [DataMember]
        public string MiddleName { get; set; }
        [DataMember]
        public string LastName { get; set; }
        [DataMember]
        public DateTime DateOfBirth { get; set; }
        [DataMember]
        public string Address { get; set; }
        [DataMember]
        public string City { get; set; }
        [DataMember]
        public string State { get; set; }
        [DataMember]
        public string Country { get; set; }
        public long MobileNumber { get; set; }
        [DataMember]
        public long LandLineNumber { get; set; }
        [DataMember]
        public string EmailId { get; set; }
        [DataMember]
        public string BlogAddress { get; set; }

       // private string _lastLoginLocation;

        [DataMember]
        public string LastLoginLocation { get; set; }

        private bool _isValidated; 
        [DataMember]
        public bool IsUserValidated { get { return _isValidated; } set { } }

       
        public UserDetails()
        {

        }

       
        public void IsValidUser()
        {

            if (this.UserName == "dk" && this._password == "dk")
            {
                _isValidated = true;
                this.FirstName = "Dharmendra";
                this.LastName = "Kumar";
                this.LastLoginLocation = "Noida";
            }
            else
                _isValidated = false;
        }
        
    }
}